const webpack = require('webpack');
const config = require('./webpack.test.config.js');

console.log('开始编译...');

webpack(config, (err, stats) => {
  if (err || stats.hasErrors()) {
    console.error('编译错误:', err || stats.toString());
    return;
  }

  console.log('编译成功!');
  console.log(stats.toString({
    chunks: false,
    colors: true
  }));
}); 